package edu.object_oriented.this_demo;

public class Card {

    String c_num;
    String psw;


    private Card() {

    }

    //默认密码
    private Card(String c_num) {
//        this.c_num = c_num;
//        psw = "123456";
        //直接调用另外一个构造方法，进行属性初始赋值
        //this调用构造时，必须在构造方法中使用，在第一句
        this(c_num, "123456");
    }

    //用户初始密码
    public Card(String c_num, String psw) {
        this.c_num = c_num;
        this.psw = psw;
    }

    public static void main(String[] args) {

        Card card = new Card("4564879");

        Card card2 = new Card("457897987", "458797");


    }


}
